-
Notifications
You must be signed in to change notification settings - Fork 140
ASoC: SOF: fix panic caused by sdev->msg being null #807
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ASoC: SOF: fix panic caused by sdev->msg being null #807
Conversation
75d88bd to
138778b
Compare
sound/soc/sof/intel/hda-ipc.c
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think "spurious" or "unexpected" would be a better description for that interrupt - in the commit message, the comment and the print, in all patches. Also I'd make it a "dev_err" or at least a "dev_warn" because we want to investigate those casses.
lyakh
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
see inline comment
|
Code looks good, but indeed please adjust the language in commit message. I'd vote for "unexpected" as the word. I'd put this in patch title as well, e.g. "handle unexpected IPC reply". |
Sometimes, driver will receive the unexpected ipc reply from DSP. The unexpected ipc reply belongs to none ipc sent before in the kernel driver. In this case, the driver should ignore the unexpected ipc reply. Signed-off-by: Libin Yang <[email protected]>
Sometimes, driver will receive the unexpected ipc reply from DSP. The unexpected ipc reply belongs to none ipc sent before in the kernel driver. In this case, the driver should ignore the unexpected ipc reply. Signed-off-by: Libin Yang <[email protected]>
Sometimes, driver will receive the unexpected ipc reply from DSP. The unexpected ipc reply belongs to none ipc sent before in the kernel driver. In this case, the driver should ignore the unexpected ipc reply. Signed-off-by: Libin Yang <[email protected]>
Sometimes, driver will receive the unexpected ipc reply from DSP. The unexpected ipc reply belongs to none ipc sent before in the kernel driver. In this case, the driver should ignore the unexpected ipc reply. Signed-off-by: Libin Yang <[email protected]>
Sometimes, driver will receive the unexpected ipc reply from DSP. The unexpected ipc reply belongs to none ipc sent before in the kernel driver. In this case, the driver should ignore the unexpected ipc reply. Signed-off-by: Libin Yang <[email protected]>
0215da7 to
2f52b3b
Compare
plbossart
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@libinyang Can you clarify where sdev->msg is set? It's far from obvious in the code? And the PR description looks borrowed from another PR so it's not clear what you are fixing.
Each PR should really be stand-alone and contain a description of the problem, how you fix it and why your fix is relevant compared to other alternatives.
|
@plbossart The sdev->msg is set in sof_ipc_tx_message_unlocked. Yes, I created this new PR because the old PR is just for QA test and it's [DO NOT MERGE]. This PR is the formal one. Please ignore the old one. Sorry for confusion. I have closed that old [DO NOT MERGE] PR and move the discussion in this PR.
|
|
More early discussion please refer: #798 |
|
@libinyang your PR change log shows this: Your code has nothing to do with this change, so I don't know if your PR is in a valid state or not. It's really painful to have to spend time to figure out what you are trying to fix. I am hours away from sending the v6 patches and I have really no time for these shenanigans. Also I will need @lyakh to approve before I merge any ipc-related change. Thanks. |
|
@plbossart The comments come from my previous version of the patch. The new patch uses another way after discussing with @lyakh . So the comments are out of date.
|
@libinyang please use your judgement in doing the right thing based on the situation. Basically, the ask is that the PR description should be accurate for someone who reads it for the first time to understand and the commits should back up the argument in the description. |
|
@ranj063 OK. Thanks. I will change the comments so we can follow in the same thread. |
plbossart
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @libinyang, looks good now. Will merge.
In ipc reply interrupt handler, some unexpected ipc reply interrupts happen. In this case, sdev->msg may be NULL pointer. We must handle it by checking the pointer
This patch fixes #767
Signed-off-by: Libin Yang [email protected]